package com.jc.springboot.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.jc.springboot.dao.UserMapper;
import com.jc.springboot.pojo.User;

@Service
public class UserService {
	@Autowired
	private UserMapper userMapper;

	@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT,timeout=36000,rollbackFor=Exception.class)
	public User findUserById(int i) {
		return userMapper.findUserById(i);
	}
	
	
}
